package com.easy.threads.entity;


import com.easy.common.IAutoScan;

import java.util.StringJoiner;

/**
 * 描述: 自动扫描参数配置
 *
 * @author gwj
 * @date 2023年12月15日 15:04
 */

public class Auto implements java.io.Serializable{
    private static final long serialVersionUID = -6098697663463047648L;

    /*
     * 是否开启自动扫描
     */
    private boolean startAutoScan;

    /*
     * 执行类
     */
    private IAutoScan scanBean;

    /*
     * 间隔时间 秒
     */
    private int intervalTime;

    public int getIntervalTime() {
        return intervalTime;
    }

    public void setIntervalTime(int intervalTime) {
        this.intervalTime = intervalTime;
    }

    public IAutoScan getScanBean() {
        return scanBean;
    }

    public void setScanBean(IAutoScan scanBean) {
        this.scanBean = scanBean;
    }

    public boolean isStartAutoScan() {
        return startAutoScan;
    }

    public void setStartAutoScan(boolean startAutoScan) {
        this.startAutoScan = startAutoScan;
    }

    public Auto(boolean startAutoScan, IAutoScan scanBean, int intervalTime) {
        this.startAutoScan = startAutoScan;
        this.scanBean = scanBean;
        this.intervalTime = intervalTime;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Auto.class.getSimpleName() + "[", "]")
                .add("startAutoScan=" + startAutoScan)
                .add("scanBean=" + scanBean)
                .add("intervalTime=" + intervalTime)
                .toString();
    }
}
